//
//  GCMSBHistoryTableViewCell.m
//  GeeCityManager
//
//  Created by 聚城科技 on 16/11/21.
//  Copyright © 2016年 聚城科技. All rights reserved.
//

#import "GCMSBHistoryTableViewCell.h"

@implementation GCMSBHistoryTableViewCell{
    
    UIView * _bgView;
    UIImageView *_rightImageV;
    UILabel *_titleLabel;
    UILabel *_detailLabel;
    UILabel *_JDRLabel;
    UILabel *_SLRLabel;
    UILabel *_ZTLabel;
    UILabel *_dataLabel;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    _bgView = [[UIImageView alloc]init];
    _bgView.frame =CGRectMake(10, 10,SCREEN_WIDTH - 20, 140);
    _bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_bgView];
    
    _titleLabel = [[UILabel alloc]init];
    _titleLabel.frame = CGRectMake(20,10,_bgView.bounds.size.width, 30);
    _titleLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    _titleLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_titleLabel];
    
    _detailLabel = [[UILabel alloc]init];
    _detailLabel.frame = CGRectMake(20 ,40 , _bgView.bounds.size.width - 40, 30);
    _detailLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    _detailLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_detailLabel];
    
    _JDRLabel = [[UILabel alloc]init];
    _JDRLabel.frame = CGRectMake(20,70, _bgView.bounds.size.width - 40,30 );
    _JDRLabel.textAlignment = NSTextAlignmentLeft;
    _JDRLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_JDRLabel];
    
    _SLRLabel = [[UILabel alloc]init];
    _SLRLabel.frame = CGRectMake(20,100, _bgView.bounds.size.width - 40, 30 );
    _SLRLabel.textAlignment = NSTextAlignmentLeft;
    _SLRLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_SLRLabel];
    
}
-(void)setHisModel:(GCMSBHisModel *)hisModel{
    
    _hisModel = hisModel;
    _titleLabel.text = [NSString stringWithFormat:@"类       别:  %@",_hisModel.type];
    _detailLabel.text = [NSString stringWithFormat:@"状       态:  %@",_hisModel.state];
    _JDRLabel.text = [NSString stringWithFormat:@"情       况:  %@",_hisModel.situation];
    _SLRLabel.text = [NSString stringWithFormat:@"巡检日期:  %@",_hisModel.lastTime];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
